#pragma once

#include<iostream>

using namespace std;

class Sales_data
{
	friend istream& my_read(istream& is, Sales_data& book);
	friend ostream& my_print(ostream& os, const Sales_data& book);
	friend Sales_data& my_add(Sales_data& book1, const Sales_data& book2);
public:
	Sales_data() = default;
	int show_isbn();
	Sales_data& combine(const Sales_data& book);
private:
	unsigned int isbn = 0;
	unsigned int num = 0;
	double value_sum = 0;
};

inline int Sales_data::show_isbn()
{
	return this->isbn;
}

istream& my_read(istream& is, Sales_data& book);

ostream& my_print(ostream& os, const Sales_data& book);

Sales_data& my_add(Sales_data& book1, const Sales_data& book2);